package com.qiaofang.entity.enums;

/**
 * @author qi.liu
 * @date: 2021/1/13 14:55
 */
public enum UserRoleEnum {

    NOTHING("1", "无"),
    PERSONAL("2", "本人"),
    DEPT("3", "本部"),
    ALL("4", "全部");

    public static String getDescByNo(String no) {
        for (UserRoleEnum userRoleEnum : UserRoleEnum.values()) {
            if(no.equals(userRoleEnum.getNo())) {
                return userRoleEnum.getDesc();
            }
        }
        return null;
    }

    UserRoleEnum(String no, String desc) {
        this.no = no;
        this.desc = desc;
    }

    private String no;

    private String desc;

    public String getNo() {
        return no;
    }

    public String getDesc() {
        return desc;
    }
}
